import type { IPage } from '@/api/interface'
import type { IMetaTagCategory } from '@/api/interface/system/meta/metaTagCategory'
import { SYSTEM_MODULE } from '@/api/helper/prefix'
import { http } from '@/utils/http'

/**
 * 查询列表
 * @param params
 * @returns {*}
 */
export function getMetaTagCategoryListApi(params: IMetaTagCategory.Query) {
  return http.get<IPage<IMetaTagCategory.Row>>(`${SYSTEM_MODULE}/meta-tag-category/list`, params)
}

/**
 * 添加
 * @param params
 * @returns {*}
 */
export function createMetaTagCategoryApi(params: IMetaTagCategory.Form) {
  return http.post(`${SYSTEM_MODULE}/meta-tag-category/create`, params)
}

/**
 * 修改
 * @param params
 * @returns {*}
 */
export function updateMetaTagCategoryApi(params: IMetaTagCategory.Form) {
  return http.put(`${SYSTEM_MODULE}/meta-tag-category/update`, params)
}

/**
 * 删除
 * @param params
 * @returns {*}
 */
export function removeMetaTagCategoryApi(params: { ids: (string | number)[] }) {
  return http.delete(`${SYSTEM_MODULE}/meta-tag-category/remove`, params)
}

/**
 * 获取详情
 * @param params
 * @returns {*}
 */
export function getMetaTagCategoryDetailApi(params: { id: number }) {
  return http.get<IMetaTagCategory.Row>(`${SYSTEM_MODULE}/meta-tag-category/detail`, params)
}
